__author__ = 'aesop'
#coding:utf-8
import qrcode


def gen_img(data):
    qr = qrcode.QRCode(
    version=2,
    error_correction=qrcode.constants.ERROR_CORRECT_H,
    box_size=10,
    border=1)
    qr.add_data(data)
    qr.make(fit=True)
    return  qr.make_image()


